<?php
/**
*
*
*/
interface Yz_Config_Interface
{
    /**
     *   @param string option (dot-separated)
     *   @return mixed|null
     *   @throw InvalidArgument if option is not a string
     */
    public function fetch( $option );

    /**
     *   @param string option (dot-separated)
     *   @param bool(false) default : the value to return if no option exists
     *   @return bool
     *   @throw InvalidArgument if option is not a string
     *   @throw ConfigException if the option's value is not boolean
     */
    public function fetchBoolean( $option, $default=false );

    /**
     *   @param string option (dot-separated)
     *   @return <config>|null
     *   @throw InvalidArgument if option is not a string
     *   @throw ConfigException if the option's value is not <config>
     */
    public function fetchSection( $option );

    /**
     *   @param string option (dot-separated)
     *   @param string('') default : the value to return if no option exists
     *   @return string
     *   @throw InvalidArgument if option is not a string
     *   @throw InvalidArgument if option not found, but the $default is not a string
     *   @throw ConfigException if the option's value is not string
     */
    public function fetchString( $option, $default='' );

} // interface

